import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    cart:[]
  },
  getters: {
  },
  mutations: {
    //添加
    addobj(state,obj){
      state.cart.push(obj)
    },
    //删除
    delobj(state,index){
      state.cart.splice(index)
    }
  },
  actions: {
  },
  modules: {
  }
})
